using System;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;

[CreateAssetMenu(menuName = "Game Scene/SceneLoadEventSO")]
public class SceneLoadEventSO : ScriptableObject {
    
    public UnityAction<GameSceneSO, Vector3, bool> LoadRequestEvent;

    /// <summary>
    /// 场景加载请求
    /// </summary>
    /// <param name="locationToLoad"> </param> 
    /// <param name="posToGo"> </param> 
    /// <param name="fadeScreen"> </param> 
    public void RaiseLoadRequestEvent(GameSceneSO locationToLoad, Vector3 posToGo, bool fadeScreen) {
        LoadRequestEvent?.Invoke(locationToLoad, posToGo, fadeScreen);
    }

}
